<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <ul id="list">
      <li>html</li>
      <li>css</li>
      <li>js</li>
    </ul>
    <script>
      let ul = document.getElementById('list')

      console.log(ul.childNodes)
      console.log(ul.childNodes.length)
      console.log(ul.children)
      console.log(ul.childElementCount)
      let lis = ul.children
      for (let i = 0; i < lis.length; i++) {
        console.log(`元素节点类型${lis[i].nodeType}, 元素节点值${lis[i].nodeName}`)
      }
    </script>
  </body>
</html>
